Conversation
We assumed every array/vector/matrix element has a non-zero stride, but `[()]` inside `BitSlice` produced a zero stride which is divide by zero. Fixes Rust-GPU#424.
Firestar99
approved these changes
Oct 9, 2025
Member
Firestar99
left a comment
There was a problem hiding this comment.
Goods good!
Maybe we should also add a difftest with bitvec to just test the common functionality? Like I did with #328 (but never fixed all the issues it presented)
|
Thank you for the fix! |
eddyb
reviewed
Oct 13, 2025
| return None; | ||
| } | ||
|
|
||
| indices.push(0); |
Member
There was a problem hiding this comment.
Heh, got a conflict locally when rebasing on top of this PR, turns out I had a commit that included the indices.push(0); (but not the check - so I resolved the conflict by keeping the main version, i.e. the one from this PR), so that's probably an extra point in the favor of this being correct.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We assumed every array/vector/matrix element has a non-zero stride, but
[()]insideBitSliceproduced a zero stride which then divides by zero.Fixes #424.